import React from 'react' 
import {
    StyleSheet,
    View,
    Text,
    TouchableOpacity,
}from 'react-native'

var _navigation = null

export default class HomePage extends React.Component {
    
    constructor(props) {
        super(props);
        _navigation = props.navigation
    }

    clickBack() {
        _navigation.navigate('Live', {name: 'denglong', callback:(res)=>{
            alert(res)
        }})
    }

    render(){
        return(
            <View>
                <Text>首页</Text>
                <TouchableOpacity style={{marginTop: 100}} activeOpacity={0.9} onPress={this.clickBack}>
                <Text style={{marginLeft: 100}}>返回</Text>
                </TouchableOpacity>
            </View>
        )
    }
    
}